package sv.mecca.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import sv.mecca.modelo.OperacionesLupus;

public class TablasLupusAction extends DispatchAction{
    public void insertar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        this.listado(mapping, form, request, response);
        }
    public void modificar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        this.listado(mapping, form, request, response);
        }
    public void actualizar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        this.listado(mapping, form, request, response);
        }
    public void eliminar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        this.listado(mapping, form, request, response);
        }
    public void listado(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        OperacionesLupus oper = new OperacionesLupus();
        request.setAttribute("Lupus", oper.listado());
        request.getRequestDispatcher("/Definiciones/Lupus.jsp").forward(request, response);
        }
    }